package org.phalanx.server.social;

import java.util.ArrayList;

import org.phalanx.server.ServerCache.Cacheable;

public class PhalanxChatRoom implements Cacheable {
	private ArrayList<Integer> chatroomList;
	private String roomName;
	
	public PhalanxChatRoom(String rName){
		roomName = rName;
		chatroomList = new ArrayList<Integer>();
	}
	
	public void setUser(Integer id){
		if (!chatroomList.contains(id)){
			chatroomList.add(id);
		}
	}
	
	public void removeUser(Integer id){
		if (chatroomList.contains(id)){
			chatroomList.remove(id);
		}
	}
	
	public boolean hasUser(Integer id){
		return chatroomList.contains(id);
	}
	
	public ArrayList<Integer> getUserList(){
		return chatroomList;
	}
	
	public String getChatroomName(){
		return roomName;
	}

	@Override
	public Integer getId() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setId(Integer id) {
		// TODO Auto-generated method stub
		
	}
}
